#!/bin/sh
# this script converts all the wav files in a folder to mp3 and renames them
# accordingly
for i in *.wav;
do
	name=`echo $i | cut -d'.' -f1`;
	echo $name;
	ffmpeg -i "$i" -acodec mp3 "$i.mp3";
done

rename 's/(.*?).wav.mp3/$1.mp3/' *.mp3

rm *.wav

echo "done"
